home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C & C++ Multimedia Cyber Classroom
/
C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso
/
cpphtp2
/
code.jar
/
code
/
ch03
/
fig03_24.txt
< prev
next >
Wrap
Text File
|
1998-02-27
|
457b
|
18 lines
1 // Fig. 3.24: fig03_24.cpp
2 // Using the unary scope resolution operator
3 #include <iostream.h>
4 #include <iomanip.h>
5
6 const double PI = 3.14159265358979;
7
8 int main()
9 {
10 const float PI = static_cast< float >( ::PI );
11
12 cout << setprecision( 20 )
13 << " Local float value of PI = " << PI
14 << "\nGlobal double value of PI = " << ::PI << endl;
15
16 return 0;
17 }